package com.hermit.hermitmusicserver.config;

import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author hermit
 * @data 2021/6/23
 */
@EnableTransactionManagement
@Configuration
public class MybatisPlusConfig {

    /**
     * 开启mybatis-plus分页功能
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
